package io;

import java.io.*;
import java.nio.charset.StandardCharsets;

public class OSWDemo {
    public static void main(String[] args) throws IOException {
        FileOutputStream fos = new FileOutputStream("osw.txt");
        OutputStreamWriter osw = new OutputStreamWriter(fos, StandardCharsets.UTF_8);

        osw.write("如果你突然打了个喷嚏，啊，那一定是我在想你。");
        osw.write("如果半夜被手机吵醒，啊，那一定是我关心。");

        System.out.println("写出完毕！");
        osw.close();
    }
}
